import { S } from '../s';
import { IPSAppView } from '../app/view/ipsapp-view';
import { IPSNavigatable } from './ipsnavigatable';
import { IPSNavigateContext } from './ipsnavigate-context';
import { IPSNavigateParam } from './ipsnavigate-param';
import { PSMDAjaxControlContainerImpl } from './psmdajax-control-container-impl';
import { IPSDERBase } from '../dataentity/der/ipsderbase';

export class PSMDAjaxControlContainerImpl2
  extends PSMDAjaxControlContainerImpl
  implements IPSNavigatable
{
  get navFilter(): string {
    return this.M.navFilter;
  }

  protected navpsappview: IPSAppView;
  getNavPSAppView(): IPSAppView | null {
    return (
      this.navpsappview ||
      (this.navpsappview = this.fillObjectModel(
        S._1e,
        this.M.getNavPSAppView,
        S._308,
      ) as IPSAppView)
    );
  }

  protected navpsder: IPSDERBase;
  getNavPSDER(): IPSDERBase | null {
    return (
      this.navpsder ||
      (this.navpsder = this.fillObjectModel(
        S._272,
        this.M.getNavPSDER,
        S._309,
      ) as IPSDERBase)
    );
  }

  get navViewParamJO(): IModel {
    return this.M.navViewParamJO;
  }

  protected psnavigatecontexts: IPSNavigateContext[];
  getPSNavigateContexts(): IPSNavigateContext[] | null {
    return (
      this.psnavigatecontexts ||
      (this.psnavigatecontexts = this.fillChildListModel(
        this.M.getPSNavigateContexts,
        S._8c,
      ) as IPSNavigateContext[])
    );
  }

  findPSNavigateContext(objKey: any): IPSNavigateContext | null {
    return this.getPSModel5(
      S._8c,
      this.getPSNavigateContexts(),
      objKey,
    ) as IPSNavigateContext;
  }

  protected psnavigateparams: IPSNavigateParam[];
  getPSNavigateParams(): IPSNavigateParam[] | null {
    return (
      this.psnavigateparams ||
      (this.psnavigateparams = this.fillChildListModel(
        this.M.getPSNavigateParams,
        S._8a,
      ) as IPSNavigateParam[])
    );
  }

  findPSNavigateParam(objKey: any): IPSNavigateParam | null {
    return this.getPSModel5(
      S._8a,
      this.getPSNavigateParams(),
      objKey,
    ) as IPSNavigateParam;
  }
  get cls(): string {
    return 'PSMDAjaxControlContainerImpl2';
  }
  instanceof(cls: string): boolean {
    if (cls == S._115 || cls == S._7) return true;
    return super.instanceof(cls);
  }
}
